fix: respect env vars in XKS config.sh - #13
Open
p0wline wants to merge 3 commits into
Open
Conversation
p0wline
added a commit
to Cosmian/kms
that referenced
this pull request
Aug 11, 2026
test_data now points to fix/xks-config-env-override (d02f52e) which
uses ${VAR:-default} in config.sh — no runtime patching needed.
After Cosmian/test_data#13 is merged, update submodule to develop HEAD.
p0wline
force-pushed
the
fix/xks-config-env-override
branch
from
August 14, 2026 09:37
e32df04 to
b342e0a
Compare
p0wline
added a commit
to Cosmian/kms
that referenced
this pull request
Aug 14, 2026
test_data now points to fix/xks-config-env-override (d02f52e) which
uses ${VAR:-default} in config.sh — no runtime patching needed.
After Cosmian/test_data#13 is merged, update submodule to develop HEAD.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Each individual XKS test script sources
utils/config.sh, which used unconditionalexport VAR="hardcoded-value"assignments. This silently overwrote any variable already set in the environment — making it impossible to inject credentials from outside (CI secrets, shell exports).Concretely: the CI workflow in
Cosmian/kmssetsSIGV4_ACCESS_KEY_ID,SIGV4_SECRET_ACCESS_KEY,XKS_PROXY_HOST, etc. before callingtest_all, butconfig.shwas resetting them to the example values, causing all SigV4 authentication to fail.Fix
Switch all five assignments in
utils/config.shto the${VAR:-default}pattern:Variables set by the caller are now preserved; the defaults only apply when nothing is exported.